<!-- Ollama 设置对话框组件 -->
<div id="settings-model" class="model">
  <div class="model-content">
    <div class="model-header">
      <h2>🛠️ Ollama 设置</h2>
      <span class="close">&times;</span>
    </div>
    <div class="model-body">
      <!-- 服务配置 -->
      <div class="settings-group">
        <label for="ollama-base-url">🌐 Ollama 服务地址</label>
        <input type="text" id="ollama-base-url" placeholder="http://localhost:11434">
        <small style="color: #6c757d; font-size: 12px; margin-top: 5px; display: block;">
          Ollama 服务器的基础URL地址
        </small>
      </div>

      <!-- 模型选择 -->
      <div class="settings-group">
        <label for="model-select">🤖 AI 模型</label>
        <div class="model-select-container">
          <select id="model-select">
            <option value="">🔄 加载中...</option>
          </select>
          <button id="refresh-models-btn">🔄 刷新</button>
        </div>
      </div>
      <!-- 创造性温度 -->
      <div class="settings-group">
        <label for="temperature-input">🌡️ 创造性温度</label>
        <div class="range-container">
          <input type="range" id="temperature-input" min="0" max="1" step="0.1" value="0.7">
          <span id="temperature-value">0.7</span>
        </div>
        <small style="color: #6c757d; font-size: 12px; margin-top: 5px; display: block;">
          较低值更保守，较高值更有创意
        </small>
      </div>

      <!-- Top-p 采样 -->
      <div class="settings-group">
        <label for="top-p-input">🎯 Top-p 采样</label>
        <div class="range-container">
          <input type="range" id="top-p-input" min="0.1" max="1" step="0.1" value="0.9">
          <span id="top-p-value">0.9</span>
        </div>
        <small style="color: #6c757d; font-size: 12px; margin-top: 5px; display: block;">
          控制输出的多样性，较低值更聚焦
        </small>
      </div>

      <div class="settings-group">
        <label for="top-k-input">🔢 Top-k 采样</label>
        <input type="number" id="top-k-input" min="1" max="100" value="40" placeholder="输入数字...">
        <small style="color: #6c757d; font-size: 12px; margin-top: 5px; display: block;">
          限制候选词汇数量 (1-100)
        </small>
      </div>

      <div class="settings-group">
        <label for="max-length-input">📝 最大输出长度</label>
        <input type="number" id="max-length-input" min="100" max="4096" value="2000" placeholder="输入数字...">
        <small style="color: #6c757d; font-size: 12px; margin-top: 5px; display: block;">
          控制AI回复的最大字符数 (100-4096)
        </small>
      </div>
      <div class="button-group">
        <button id="save-settings-btn">💾 保存设置</button>
      </div>
    </div>
  </div>
</div>